<?php
include_once 'general/common.php';
if (!isset($_SESSION['sessionKey']) || empty($_SESSION['sessionKey'])) {
    header("Location:login.php");
} else {
    $sessionKey = $_SESSION['sessionKey'];
}
$Pnum = 40;
if (!isset($_GET['page']) || empty($_GET['page']))
    $page = 1;
else
    $page = $_GET['page'];
$req = new PictureGetRequest;
$req->setDeleted("unfroze");
$req->setOrderBy("time:asc");
$req->setPageNo($page);
$req->setPageSize($Pnum);
$resp = $c->execute($req, $sessionKey);
$pictures = xml2array($resp);
unset($req,$resp);
echo "<table border=1>";
echo "<tr><td>图片名称</td><td>链接地址</td><td>是否审核</td><td>是否已引用</td></tr>";
foreach ($pictures['pictures']['picture'] as $key => $value) {
    $req = new PictureIsreferencedGetRequest;
    $req->setPictureId($value['picture_id']);
    $resp = $c->execute($req, $sessionKey);
    $Isreferenced=xml2array($resp);
    unset($req,$resp);
    echo "<tr><td>$value[title]</td><td>$value[picture_path]</td><td>$value[status]</td><td>$Isreferenced[is_referenced]</td></tr>";
}
echo "<table>";
$Pid = '';
$Vcount = $pictures['totalResults'];
$className = '';
echo ThePage($Pid, $page, $Vcount, $Pnum, $className);